﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Shake.Framework.View;
using Shake.Framework.Mvc;

using Shake.Framework.Models;
using Shake.Framework.Attributes;
using Shake.Business.Infrastructures;
using Shake.Domian.Filters;

namespace Shake.Web.Controllers
{
    [Theme("LayUiAdmin")]
    public class LogHomeController : Controller
    {
        public ILogService LogService { get; set; }

        // GET: LogHome
        public ActionResult Index(PageArgument arg, LogFilter filter)
        {
            var model = LogService.GetLogs(arg, filter);
            if (Request.IsAjaxRequest())
            {
                return this.ToJson(model);
            }
            return this.Shake(model);
        }
    }
}